:- module(boxes, [box_def/2], []).

box_def(Name, Box):- box_data(Name, Box), !.
box_def(Name, sb("", [])):- display(unknown_box(Name)), nl, !.


%% This is the navigation bar of the initial page
box_data(box_main,
        sb("General Links", [
                                do_search,
                                describe_packages,
                                maintenance,
                                related_info
                            ]
          )
       ).


box_data(box_information,
        sb("About the Amos Project", [
                                         amos_gentle_introduction,
                                         project_aims,
                                         partners,
                                         ciao_prolog,
                                         open_source,
                                         free_software
                                     ]
          )
        ).

box_data(box_administration,
        sb("Administration", [
				 database_status, % To WebDB CGI
				 database_download, % To WebDB CGI
				 database_upload, % To WebDB CGI
                                 review_packages, % To WebDB CGI
                                 edit_dictionary, % To WebDB CGI
                                 database_maintenance, % To WebDB CGI
				 database_dialogues, % To WebDB CGI
				 database_templates, % To WebDB CGI
                                 navigation_basics, % In administration_info
                                 reviewing_procedure, % In administration_info
                                 editing_dictionary, % In administration_info
                                 server_procedures
                             ]
          )
        ).


%% Boxes related to the search procedures.  The basic box has pointers
%% to the documents describing the basics of the search procedure.
%% These are further augmented by various predicates which add
%% context-sensible information.

box_data(box_search_basic,
        sb("Search", [
                         search_procedure,      % Start of page
                         what_are_terms,        % Desc. terms
                         what_are_packages,     % Desc. packages
			 more_search,            % Package search
                         main_page              % Back to top
                     ]
          )
        ).

%% In the default search page, you describe what is this page.
box_data(box_search, SB):- box_data(box_search_basic, SB).

%% In the page where the search is explained (all text), we have the
%% basic search navigation box.
box_data(box_search_explained, SB):- box_data(box_search_basic, SB).

%% When we have the results, the box is a full one
box_data(box_results_page, SB):- box_data(box_search_basic, SB).

box_data(box_extended_results_page, SB):-  box_data(box_search_basic, SB).

box_data(box_search_error, SB):-  box_data(box_search_basic, SB).

box_data(box_term_desc_page, SB):-  box_data(box_search_basic, SB).


%% These are the standard boxes (they appear always).

box_data(box_standard_upper,
        sb("Partners and Funding", [
                         conecta_www,
                         clip_www,
                         eu_projects
                     ]
          )
       ).

box_data(box_standard_lower,
        sb("Useful Information", [
                                   getting_sources,
                                   tech_reports,
%                                   status_news,
                                   mailing_lists,
                                   web_master
                         ]
          )
       ).


box_data(box_getting_sources,
        sb("Source Code", [
                        cvs_access
                    ]
          )
       ).

box_data(box_webdb,
        sb("Back To...", [
                        do_search,
                        describe_packages,
                        main_page
                    ]
          )
       ).

 %% box_data(box_news,
 %%         sb("News", [])).

 %% box_data(box_tech_rep,
 %%         sb("Technical Papers", [])).

 %% box_data(box_webdb,
 %%         sb("Package Addition", [])).
